package TopologyService;

import java.util.ArrayList;

import org.apache.thrift.TException;


public class TopologyHandler implements TopologyService.Iface {

	private Topology topology;
	
	public TopologyHandler(Topology topology){
		this.topology = topology;
	}
	
	@Override
	public void prevJoin(int nodeID) throws TException {
		System.out.println("Process " + topology.myID() + " recieved joining req (prev) " + nodeID);
		topology.setPrev(nodeID);
	}

	@Override
	public void nextJoin(int nodeID) throws TException {
		System.out.println("Process " + topology.myID() + " recieved joining req (next) " + nodeID);
		topology.setNext(nodeID);
	}
}
